package com.nop.mdp.services;

import org.hibernate.SessionFactory;
import org.hibernate.classic.Session;

/**
 * 
 * @author gtourvieille
 * @created 16 avr. 08
 * @date $Date: 2008-04-28 12:28:45 +0200 (lun., 28 avr. 2008) $
 * @version $Id: BaseService.java 7548 2008-04-28 10:28:45Z gtourvieille $
 */

public abstract class BaseService
{
	
	private SessionFactory	sessionFactoryMdp;
	
	public SessionFactory getSessionFactoryMdp()
	{
		return this.sessionFactoryMdp;
	}
	
	public void setSessionFactoryMdp( SessionFactory sessionFactoryMdp )
	{
		this.sessionFactoryMdp = sessionFactoryMdp;
	}
	
	protected Session getSession()
	{
		return this.getSessionFactoryMdp().getCurrentSession();
	}
	
}
